//
//  NSErrorAdditions.m
//  Tint
//
//  Created by Kevin Wu on 2/22/12.
//  Copyright (c) 2012 Telligenty. All rights reserved.
//

#import "NSErrorAdditions.h"

@implementation NSError (Tint)


#pragma mark - Creating

+ (NSError *)errorWithDomain:(NSString *)domain description:(NSString *)description {
    NSDictionary *userInfo = [NSDictionary dictionaryWithObjectsAndKeys:
                              description, NSLocalizedDescriptionKey, nil];
	return [self errorWithDomain:domain code:0 userInfo:userInfo];
}

+ (NSError *)errorWithDomain:(NSString *)domain description:(NSString *)description failureReason:(NSString *)failureReason {
    NSDictionary *userInfo = [NSDictionary dictionaryWithObjectsAndKeys:
                              description, NSLocalizedDescriptionKey, 
                              failureReason, NSLocalizedFailureReasonErrorKey, nil];
	return [self errorWithDomain:domain code:0 userInfo:userInfo];
}

@end
